<template>
    <!-- 学员签到列表 -->
    <div class="quarterly_report">
        <div class="xl-table-content">
            <xlTable
                    :columns="columns"
                    :dataSource="data"
                    rowKey="id"
                    :pagination="pagination"
                    :loading="loading"
                    @change="handleTableChange"
                    bordered
                    :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}">
                >
                <template v-slot:action="scope">  
                    <a>已迁出</a>
                    <a-divider type="vertical"/>
                    <a-dropdown >
                        <a class="ant-dropdown-link" >更多 <a-icon type="down"/></a>
                        <a-menu slot="overlay" >
                            <a-menu-item @click="seeForm(scope.record)">
                                <a>查看</a>
                            </a-menu-item>
                            <a-menu-item v-if="status != 1">
                                <a-popconfirm title="确定删除吗?" @confirm="() => delForm(scope.record.id)">
                                    <a>删除</a>
                                </a-popconfirm>
                            </a-menu-item>
                        </a-menu>
                    </a-dropdown>
                </template>
            </xlTable>
        </div>
        <xlForm ref="xlForm" @handleOk="handleOk"></xlForm>
        <seeForm ref="seeForm"></seeForm>
    </div>
</template>

<script>
   

    import xlMixin from '../../mixin/index'
  
    
    export default {
        name: "index",
        mixins:[xlMixin],
        data(){
            return{
                columns:[
                    {
                        title: '编号',
                        key: 'rowIndex',
                        align: "center",
                        fixed: 'left',
                        width:'80px',
                        customRender: function (t, r, index) {
                            return parseInt(index) + 1;
                        }
                    },
                    {
                        title: '课程名称',
                        dataIndex: 'companyName',
                        fixed: 'left',
                        type:'input',
                    },
                    {
                        title: '培训导师',
                        dataIndex: 'creditCode',
                        // tableVisible:true, 列表不展示
                        type:'input'
                    },
                    {
                        title: '服务机构',
                        dataIndex: 'createDateTime',
                        type:'input',
                        tableVisible: true,
                        formVisible: true
                    },
                    {
                        title: '学员名称',
                        dataIndex: 'registerDate',
                        type:'input'
                    },
                    {
                        title: '企业名称',
                        dataIndex: 'establishDate',
                        type:'input'
                    },
                    {
                        title: '学员类型',
                        dataIndex: 'registerAddress',
                        type:'input'
                    },
                   
                    {
                        title: '签到时间',
                        dataIndex: 'industrialDomain',
                        type:'date',
                    },
                    
                    {
                        title: '操作',
                        dataIndex: 'action',
                        align: "center",
                        fixed: 'right',
                        width:'150px',
                        scopedSlots: {customRender: 'action'},
                    }
                ],
               
                // 请求参数
                paramMore:{
                    "newDevOrgId": ''
                },
                url: {
                    list: "/ndo/api/ndo/hatch/company/introduction/page/list",
                    add: '/ndo/api/ndo/hatch/company/introduction/save',
                    edit: '/ndo/api/ndo/hatch/company/introduction/save',
                    delete: "/ndo/api/ndo/hatch/company/remove",
                    deleteBatch: "/ndo/api/ndo/hatch/company/move/out",
                    exportXlsUrl: "ndo/api/new/dev/org/export/introduction/company",
                    importExcelUrl: "ndo/api/ndo/hatch/company/importExcel",
                    importExcelDemoUrl:'/ndo/api/ndo/hatch/company/importTemplate'
                }
            }
        },
        props:{
            signType:Number  // 判断是哪个营的
        },
        created(){
            // 请求参数判断是哪个营
            this.paramMore.newDevOrgId = this.signType
            console.log(this.paramMore.newDevOrgId,111111)
            
        },
        watch:{
            // 请求参数判断是哪个营
           signType:{
               immediate:true,
                handler:function(){
                    console.log(this.signType,222222)
                }
           }
       },
       methods:{
          
       },
       components:{
           
       }
    }
</script>
<style scoped>

</style>
